import colors from "tailwindcss/colors";

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  ssr: true,
  devServer: {
    port: 4000,
  },
  router: {
    // options,
    // trailingSlash: true // 这将确保所有路由末尾都有斜杠
  },
  postcss: {
    plugins: {
      "postcss-nested": {},
      "postcss-custom-media": {},
    },
  },
  compatibilityDate: "2024-11-01",
  devtools: { enabled: false },
  modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt", "@vant/nuxt"],
  runtimeConfig: {
    public: {
      clientEnv: process.env,
      baseURL: process.env.API_URL || 'https://test-hook.powerfulclean.net',
    },
  },
  css: ["~/assets/css/index.scss"],
  app: {
    // pageTransition: { name: 'page', mode: 'out-in' },
    // <meta name="google-site-verification" content="Tq2G65xSRT3qD6zZOihQHCkU-5KoCPE6rRz9RjUYZr0" />
    head: {
      link: [
        { rel: 'icon', type: 'image/x-icon', href: '/favicon.webp' },
        // {
        //   rel: "stylesheet",
        //   href: "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css",
        // },
      ],
      meta: [
        {
          "name": "viewport",
          "content": "width=device-width, initial-scale=1"
        },
        {
          "charset": "utf-8"
        },
        // { charset: 'utf-8' },
        { name: 'google-site-verification', content: 'i7r9aE_eKONT-ghMTlfqPya0UiVVzF8mP6N51pH2Eak' },
      ],
      script: [
        { src: 'https://www.googletagmanager.com/gtag/js?id=G-097R6751JM' }
        // 可以添加全局的 script 标签，例如 Google Analytics 等
      ],
    },
  },
  // pinia: {
  //   autoImports: ['defineStore'] // 允许在组件中直接使用defineStore而不需要手动导入
  // }
  nitro: {
    compressPublicAssets: true, // 启用压缩
  },
});
